home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume16 / sao / patch1 < prev    next >
Encoding:
Internet Message Format  |  1988-12-20  |  2.9 KB

  1. Subject:  v16i139:  Smithsonian Astronomical Observatory, Patch1
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4.  
  5. Submitted-by: Alan Wm Paeth <awpaeth@watcgl.waterloo.edu>
  6. Posting-number: Volume 16, Issue 139
  7. Archive-name: sao/patch1
  8.  
  9. [  You might have seen this patch in comp.sources.d or c.s.bugs; I took it
  10.    and turned it into a real-style context diff, which is what most folks
  11.    are used to -- not a diff against the shar file.  --r$  ]
  12.  
  13.     /Alan
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of shell archive."
  22. # Contents:  stardust.pch
  23. # Wrapped by rsalz@fig.bbn.com on Wed Dec 14 19:22:44 1988
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'stardust.pch' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'stardust.pch'\"
  27. else
  28. echo shar: Extracting \"'stardust.pch'\" \(1551 characters\)
  29. sed "s/^X//" >'stardust.pch' <<'END_OF_FILE'
  30. X*** stardust.c.BAK    Wed Dec 14 19:18:09 1988
  31. X--- stardust.c    Wed Dec 14 19:20:04 1988
  32. X***************
  33. X*** 1,9 ****
  34. X--- 1,16 ----
  35. X  /*
  36. X   * stardust.c -- (un)pulverize files into dust more digestable by compress
  37. X+  * (VERSION #2)
  38. X   *
  39. X   * stardust -e <file.star | compress >small # encode for better compression
  40. X   * uncompress small | stardust >file.star   # decode after decompress
  41. X   *
  42. X+  * updated Dec 1988 with thanks to Dave Yearke (bitnet: sunybcs!sigmast!dgy)
  43. X+  * The patches handle character versus integer machine incompatabilities.
  44. X+  *
  45. X+  * The release also squelches a compiler ambiguity error inadvertantly omitted
  46. X+  * in the original (December, 1988) posting to comp.sources.unix (ver 0->ver1).
  47. X+  *
  48. X   * copyright (c) 1988 by Alan Paeth (awpaeth@watcgl)
  49. X   */
  50. X  
  51. X***************
  52. X*** 42,58 ****
  53. X  cline(bo, ba, bb)
  54. X      char *bo, *ba, *bb;
  55. X      {
  56. X!     int i;
  57. X      for (i=0; i<BS; i++)
  58. X      {
  59. X!     char c, t;
  60. X!     c = *ba++ - (t=*bb++);
  61. X      if (t != '0')
  62. X          {
  63. X          if (c < 0) c += 10;
  64. X          if (en && ((c < 0) || (c > 9))) err("non-digit or non-match");
  65. X          }
  66. X!     *bo++ = c + '0';
  67. X      }
  68. X      }
  69. X  
  70. X--- 49,64 ----
  71. X  cline(bo, ba, bb)
  72. X      char *bo, *ba, *bb;
  73. X      {
  74. X!     int i, c, t;            /* ver 2 -- c, t: are now ints */
  75. X      for (i=0; i<BS; i++)
  76. X      {
  77. X!     c = *ba++ - (t = *bb++);    /* ver 1 -- "=*bb" in bogus net copy */
  78. X      if (t != '0')
  79. X          {
  80. X          if (c < 0) c += 10;
  81. X          if (en && ((c < 0) || (c > 9))) err("non-digit or non-match");
  82. X          }
  83. X!     *bo++ = (char)c + '0';        /* ver 2 -- must now recast "c" */
  84. X      }
  85. X      }
  86. X  
  87. END_OF_FILE
  88. if test 1551 -ne `wc -c <'stardust.pch'`; then
  89.     echo shar: \"'stardust.pch'\" unpacked with wrong size!
  90. fi
  91. # end of 'stardust.pch'
  92. fi
  93. echo shar: End of shell archive.
  94. exit 0
  95.